Optimal. Leaf size=66 \[ -\frac{5 \cos ^3(a+b x)}{6 b}-\frac{5 \cos (a+b x)}{2 b}-\frac{\cos ^3(a+b x) \cot ^2(a+b x)}{2 b}+\frac{5 \tanh ^{-1}(\cos (a+b x))}{2 b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0449874, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235, Rules used = {2592, 288, 302, 206} \[ -\frac{5 \cos ^3(a+b x)}{6 b}-\frac{5 \cos (a+b x)}{2 b}-\frac{\cos ^3(a+b x) \cot ^2(a+b x)}{2 b}+\frac{5 \tanh ^{-1}(\cos (a+b x))}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2592
Rule 288
Rule 302
Rule 206
Rubi steps
\begin{align*} \int \cos ^3(a+b x) \cot ^3(a+b x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{x^6}{\left (1-x^2\right )^2} \, dx,x,\cos (a+b x)\right )}{b}\\ &=-\frac{\cos ^3(a+b x) \cot ^2(a+b x)}{2 b}+\frac{5 \operatorname{Subst}\left (\int \frac{x^4}{1-x^2} \, dx,x,\cos (a+b x)\right )}{2 b}\\ &=-\frac{\cos ^3(a+b x) \cot ^2(a+b x)}{2 b}+\frac{5 \operatorname{Subst}\left (\int \left (-1-x^2+\frac{1}{1-x^2}\right ) \, dx,x,\cos (a+b x)\right )}{2 b}\\ &=-\frac{5 \cos (a+b x)}{2 b}-\frac{5 \cos ^3(a+b x)}{6 b}-\frac{\cos ^3(a+b x) \cot ^2(a+b x)}{2 b}+\frac{5 \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\cos (a+b x)\right )}{2 b}\\ &=\frac{5 \tanh ^{-1}(\cos (a+b x))}{2 b}-\frac{5 \cos (a+b x)}{2 b}-\frac{5 \cos ^3(a+b x)}{6 b}-\frac{\cos ^3(a+b x) \cot ^2(a+b x)}{2 b}\\ \end{align*}
Mathematica [A] time = 0.038896, size = 103, normalized size = 1.56 \[ -\frac{9 \cos (a+b x)}{4 b}-\frac{\cos (3 (a+b x))}{12 b}-\frac{\csc ^2\left (\frac{1}{2} (a+b x)\right )}{8 b}+\frac{\sec ^2\left (\frac{1}{2} (a+b x)\right )}{8 b}-\frac{5 \log \left (\sin \left (\frac{1}{2} (a+b x)\right )\right )}{2 b}+\frac{5 \log \left (\cos \left (\frac{1}{2} (a+b x)\right )\right )}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.013, size = 81, normalized size = 1.2 \begin{align*} -{\frac{ \left ( \cos \left ( bx+a \right ) \right ) ^{7}}{2\,b \left ( \sin \left ( bx+a \right ) \right ) ^{2}}}-{\frac{ \left ( \cos \left ( bx+a \right ) \right ) ^{5}}{2\,b}}-{\frac{5\, \left ( \cos \left ( bx+a \right ) \right ) ^{3}}{6\,b}}-{\frac{5\,\cos \left ( bx+a \right ) }{2\,b}}-{\frac{5\,\ln \left ( \csc \left ( bx+a \right ) -\cot \left ( bx+a \right ) \right ) }{2\,b}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.977276, size = 89, normalized size = 1.35 \begin{align*} -\frac{4 \, \cos \left (b x + a\right )^{3} - \frac{6 \, \cos \left (b x + a\right )}{\cos \left (b x + a\right )^{2} - 1} + 24 \, \cos \left (b x + a\right ) - 15 \, \log \left (\cos \left (b x + a\right ) + 1\right ) + 15 \, \log \left (\cos \left (b x + a\right ) - 1\right )}{12 \, b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.04597, size = 265, normalized size = 4.02 \begin{align*} -\frac{4 \, \cos \left (b x + a\right )^{5} + 20 \, \cos \left (b x + a\right )^{3} - 15 \,{\left (\cos \left (b x + a\right )^{2} - 1\right )} \log \left (\frac{1}{2} \, \cos \left (b x + a\right ) + \frac{1}{2}\right ) + 15 \,{\left (\cos \left (b x + a\right )^{2} - 1\right )} \log \left (-\frac{1}{2} \, \cos \left (b x + a\right ) + \frac{1}{2}\right ) - 30 \, \cos \left (b x + a\right )}{12 \,{\left (b \cos \left (b x + a\right )^{2} - b\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 11.7231, size = 719, normalized size = 10.89 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.16818, size = 220, normalized size = 3.33 \begin{align*} \frac{\frac{3 \,{\left (\frac{10 \,{\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} + 1\right )}{\left (\cos \left (b x + a\right ) + 1\right )}}{\cos \left (b x + a\right ) - 1} - \frac{3 \,{\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} - \frac{16 \,{\left (\frac{12 \,{\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} - \frac{9 \,{\left (\cos \left (b x + a\right ) - 1\right )}^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} - 7\right )}}{{\left (\frac{\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} - 1\right )}^{3}} - 30 \, \log \left (\frac{{\left | -\cos \left (b x + a\right ) + 1 \right |}}{{\left | \cos \left (b x + a\right ) + 1 \right |}}\right )}{24 \, b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]